var express = require("express");
var router = express.Router();
const JWT = require("../utils/JWT");

/* GET home page. */
router.get("/", function (req, res, next) {
  // console.log(req.session.person);
  res.render("index");
});

/* const token = JWT.encode({ name: "xiaoming" }, "5000");
console.log(token);
const obj = JWT.decode(token);
console.log(obj);
setTimeout(() => {
  // 注意如果想看到解析后的结果 需要重新解析
  const obj = JWT.decode(token);
  console.log(obj);
}, 4000);
setTimeout(() => {
  const obj = JWT.decode(token);
  console.log(obj);
}, 6000); */

module.exports = router;
